import request from '../utils/request.js'

export const loadUsers = data => request('/usr/loadUsers', data)

export const getCurrentUser = data => request('/user/getCurrentUser', data)

export const logoutUser = data => request('/user/logout', data)

export const loginUser = data => request('/user/login', data, 'get', true)

export const publishProject = data =>
	request('/project/publish', data, 'post', true)

export const loadProject = data => request('/project/getProjectPage', data)

export const saveProject = data =>
	request('/project/saveProject', data, 'post', true)

export const saveProjectAs = data => request('/project/saveProjectAs', data)

export const getProjectById = data => request('/project/getProjectById', data)

export const getDataUrl = data => request(data, {}, 'get', true)

export const sendSMSUrl = data => request('/ccbb/sendSMS', data, 'get', true)

export const phoneLogin = data => request('/user/phoneLogin', data, 'get', true)

export const registerUser = data =>
	request('/user/register', data, 'post', true)

export const getLastModifyProject = data =>
	request('/project/getLastModifyProject', data, 'get')

export const getReportData = data => request('/project/getProjectById', data)



// WEBPACK FOOTER //
// ./src/API/index.js